import React, {Component} from 'react';
import {
    Image,
    StyleSheet,
    Text,
    View,
    TextInput,
    TouchableOpacity,
    DrawerLayoutAndroid,
    StatusBar,
} from 'react-native';
import {DefaultTabBar} from "react-native-scrollable-tab-view";

var ScrollableTabView = require('react-native-scrollable-tab-view');
export default class Activity extends Component {
    render() {
        return (
            <View style={{flex: 1}}>
                <ScrollableTabView
                    // style={{marginTop: 30, height: 40, flex: 1}}
                     style={{
                         flex: 1,
                         // backgroundColor: '#F5FCFF',
                         marginTop: 20,
                         marginLeft: 20,
                         marginRight: 20,
                         justifyContent: 'center',
                         height:30
                     }}
                    onChangeTab={(obj) => {
                        console.log('index:' + obj.i);
                    }}
                    locked={true}
                    renderTabBar={() => <DefaultTabBar/>}
                     tabBarActiveTextColor='#36ADAB'
                     tabBarInactiveTextColor='#000'
                    // tabBarUnderlineStyle={{backgroundColor: '#36ADAB'}}
                     tabBarUnderlineStyle={{backgroundColor: '#36ADAB', width: 81, marginLeft: 42, height: 2}}
                    // tabBarWithoutAnimation={false}
                     tabBarTextStyle={{fontSize: 14}}
                >
                    <Text tabLabel="我是老师" style={{height: 20}}></Text>
                    <Text tabLabel="我是学生" style={{height: 20}}></Text>
                </ScrollableTabView>
                <Text style={{flex: 9}}>123</Text>
            </View>
        );
    }
}

class activity extends Component {
    render() {
        return (
            <View/>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    }
});

